package com.tongqu.service.serviceimpl;

import com.tongqu.mapper.JumpDataDao;
import com.tongqu.service.JumpDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class JumpDataServiceImpl implements JumpDataService {

    @Autowired
    private JumpDataDao jumpDataDao;
    @Override
    public boolean saveData(List dataList) {
        if(dataList!=null && dataList.size()!= 0){
            return jumpDataDao.saveData(dataList)>0;
        }
        return true;
    }

    @Override
    public boolean clearAllData() {
        jumpDataDao.clearData();
        return  jumpDataDao.clearAllData()>=0;
    }

    @Override
    public boolean saveDataIntoTempData() {

        return jumpDataDao.saveDataIntoTempData()>=0;
    }
}
